﻿<ion-view  cache-view="false" ng-init="init()">
  <ion-nav-bar class="bar-positive bar" align-title="center">
    <ion-nav-back-button ng-click="klyBack()"></ion-nav-back-button>
    <ion-nav-title>
      <button class="tab-btn button nav-btn-left" ng-class="filterState === 1 ? 'current': ''" ng-click="filterWaybills(1)">进行中</button>
      <button class="tab-btn button nav-btn-right" ng-class="filterState === 2 ? 'current': ''" ng-click="filterWaybills(2)">发布历史</button>
    </ion-nav-title>
    <ion-nav-buttons side="right">
      <button class="button" ng-click="addPublic()">新增</button>
    </ion-nav-buttons>
    <!--<ion-nav-buttons class="button-center">-->
      <!-- -->
    <!--</ion-nav-buttons>-->
  </ion-nav-bar>

  <ion-content class="gray_back">
    <section class="g_main">
      <!-- 订单信息列表 -->
      <section class="order_list">
        <p  ng-if="!nowaybill" style="text-align: center" ng-mode="{{nowaybill}}">暂无运单数据</p>
        <div>
        <ion-list>
          <li ng-click="toWaybillDetail(item.carrier_pub_id)" ng-repeat="item in pub_list" class="item">
            <header><strong>订单编号： {{item.carrier_pub_id}}</strong>
            <em class="status">

               <button ng-if="filterState==1" class="button button-clear button-positive" ng-click="editpublish('{{item.carrier_pub_id}}')">编辑</button>
               <button ng-if="filterState==1" class="button button-clear button-positive" ng-click="cancelPublish('{{item.carrier_pub_id}}')">取消</button>
               <button ng-if="filterState==2" class="button button-clear button-positive" ng-click="repeatPublish('{{item.carrier_pub_id}}')">重新发布</button>
            </em>
            </header>
            <ul>
              <li>
                <i class="icon icon_order_1"></i>
                <span>装货日期</span>
                <em>{{item.shipment_time_disp}}</em>
              </li>
              <li>
                <i class="icon icon_order_2"></i>
                <span>装货地点</span>
                <em>{{item.src_location_title}}</em>
              </li>
              <li>
                <i class="icon icon_order_3"></i>
                <span>终点</span>
                <em>{{item.dest_location}}</em>
              </li>
              <li>
                <i class="icon icon_order_5"></i>
                <span>吨位</span>
                <em>{{item.load_disp}}</em>
              </li>
              <li>
                <i class="icon icon_order_4"></i>
                <span>价格</span>
                <em><span>{{item.price}}</span>元</em>
              </li>

            </ul>
          </li>
        </ion-list>

        </div>
        </ion-scroll>
      </section>
    </section>
   </ion-content>
</ion-view>
